import React from 'react';
import { Modal } from 'antd';

export interface CreateInfoModalProps {
  visible?: boolean;
  onCancel?: () => void;
  onOk?: () => void;
  title?: string;
}

const CreateInfoModal: React.FC<CreateInfoModalProps> = (props) => {
  const { visible, onCancel, title, onOk } = props;
  return (
    <Modal
      destroyOnClose
      title={title}
      visible={visible}
      onCancel={onCancel}
      footer={null}
      maskClosable={false}
      onOk={onOk}
      {...props}
    >
      {props.children}
    </Modal>
  );
};

export default CreateInfoModal;
